package com.app.shortvideo.ext

import android.app.Activity
import android.content.Intent
import com.app.shortvideo.MApplication

/**
 * 通过反射获得类进行跳转
 */
fun jumpActivity(activity: Activity){
    val intent = Intent(MApplication.mInstance.getCurrentActivity(),activity::class.java)
    MApplication.mInstance.getCurrentActivity()?.startActivity(intent)
}

fun jumpActivity(activityName:String){
    val activityClass = Class.forName(activityName)
    val intent = Intent(MApplication.mInstance.getCurrentActivity(),activityClass)
    MApplication.mInstance.getCurrentActivity()?.startActivity(intent)
}